<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:86:"D:\PhpStudy\PHPTutorial\WWW\03seo7mb.net\public/../app/admin\view\seo\xiaofeilist.html";i:1584608781;}*/ ?>
<div class="box">
    
  <div class="box-header">

    <div class="row">
        <div class="col-sm-5">
        	<!--<ob_link><a class="btn export" url="<?php echo url('xiaofeiexcel'); ?>"><i class="fa fa-download"></i> 导 出</a></ob_link>-->
        	<div class="input-group input-group-sm">
                <form action="<?php echo url('xiaofeiexcel'); ?>" method="post" class="form_single">
                <select name="create_time" style="width: 200px;" class="form-control pull-right">
                    <option value="">全部</option>
                    <option value="yesterday">昨天</option>
                    <option value="today">今天</option>
                    <option value="week">最近一周</option>
                    <option value="month">最近一月</option>

                </select>
                <div class="input-group-btn">
                    <button type="submit" class="btn btn-info btn-flat"><i class="fa fa-download"></i> 导 出</button>
                </div>

                </form>
            </div>
        </div>
        <div class="col-sm-7">
            <div class="box-tools search-form pull-right">
                <div class="input-group input-group-sm">


                    <select name="search_engine" class="form-control pull-right" style="width: 200px;" >
                        <option value="">请选择搜索引擎</option>
                        <option value="baidupc" <?php if(urldecode(input('search_engine')) == 'baidupc'): ?> selected = "selected" <?php endif; ?> >百度</option>
                        <option value="baidumobile" <?php if(urldecode(input('search_engine')) == 'baidumobile'): ?> selected = "selected" <?php endif; ?> >百度移动端</option>
                        <option value="360pc" <?php if(urldecode(input('search_engine')) == '360pc'): ?> selected = "selected" <?php endif; ?> >360</option>
                        <option value="360mobile" <?php if(urldecode(input('search_engine')) == '360mobile'): ?> selected = "selected" <?php endif; ?> >360移动端</option>
                        <option value="sogoupc" <?php if(urldecode(input('search_engine')) == 'sogoupc'): ?> selected = "selected" <?php endif; ?> >搜狗</option>
                        <option value="sougoumobile" <?php if(input('search_engine') == 'sogoumobile'): ?> selected = "selected" <?php endif; ?> >搜狗移动端</option>
                        <option value="smmobile" <?php if(input('search_engine') == 'smmobile'): ?> selected = "selected" <?php endif; ?> >神马搜索</option>

                    </select>

                    <input class="form-control pull-right" style="width: 200px;" id="test" name="create_time" placeholder="请选择时间"  value="<?php echo input('create_time'); ?>" type="text">

                    <input type="text" name="search_keyword" style="width: 200px;" class="form-control pull-right" value="<?php echo urldecode(input('search_keyword')); ?>" placeholder="输入网站关键词搜索">

                    <input type="text" name="search_data" style="width: 200px;" class="form-control pull-right" value="<?php echo input('search_data'); ?>" placeholder="请输入域名搜索">

                    <div class="input-group-btn">
                      <button type="button" id="search"  url="<?php echo url('xiaofeilist'); ?>" class="btn btn-info btn-flat"><i class="fa fa-search"></i></button>
                    </div>

                </div>
           </div>
        </div>
    </div>
    
  </div>
    
    
  <div class="box-body table-responsive">
    <table  class="table table-bordered table-hover">
      <thead>
      <tr>
          <th>搜索引擎</th>
          <th>关键词</th>
          <th>金额</th>
          <?php if($member['leader_id'] <= 1): ?>
          <th>代理利润</th>
          <?php endif; if($member['leader_id'] == 0): ?>
          <th>平台利润</th>
          <?php endif; ?>
          <th>日期</th>
          <th>排名</th>
          <th>域名</th>
          <th>用户名</th>
          <th>截图查看</th>
          <th>历史查询</th>
      </tr>
      </thead>
      
      <?php if(!(empty($list["0"]["id"]) || (($list["0"]["id"] instanceof \think\Collection || $list["0"]["id"] instanceof \think\Paginator ) && $list["0"]["id"]->isEmpty()))): ?>
        <tbody>
            <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                <tr>

                  <td>
                      <?php if($vo['search_engine'] == 'baidumobile'): ?> <span class="label" style="background-color: #ef5350"> 百度移动端</span>  <?php endif; if($vo['search_engine'] == 'baidupc'): ?> <span class="label" style="background-color: #33ca35"> 百度</span> <?php endif; if($vo['search_engine'] == '360pc'): ?><span class="label" style="background-color: #4484ca"> 360</span> <?php endif; if($vo['search_engine'] == '360mobile'): ?> <span class="label" style="background-color: #f72f8e"> 360手机端</span><?php endif; if($vo['search_engine'] == 'sogoupc'): ?> <span class="label" style="background-color: #bf8fca"> 搜狗</span><?php endif; if($vo['search_engine'] == 'sogoumobile'): ?> <span class="label" style="background-color: #66b5ca"> 搜狗移动端</span><?php endif; if($vo['search_engine'] == 'smmobile'): ?> <span class="label" style="background-color: #f732bc"> 神马搜索</span><?php endif; ?>

                  </td>

                  <td><?php echo $vo['keyword_name']; ?></td>
                  <td>-<?php echo $vo['price']; ?></td>
                    <?php if($member['leader_id'] <= 1): ?>
                    <td>
                        <?php if($vo['rank'] <= '10'): ?>
                            <?php echo $vo['dllirun_one']; elseif($vo['rank'] <= '20'): ?>
                            <?php echo $vo['dllirun_two']; endif; ?>
                    </td>
                    <?php endif; if($member['leader_id'] == 0): ?>
                        <td>
                            <?php if($vo['rank'] <= '10'): ?>
                                <?php echo $vo['ptlirun_one']; elseif($vo['rank'] <= '20'): ?>
                                <?php echo $vo['ptlirun_two']; endif; ?>
                        </td>
                    <?php endif; ?>
                  <td><?php echo $vo['create_time']; ?></td>
                    <td><?php echo $vo['rank']; ?></td>
                  <td><?php echo $vo['url']; ?></td>
                    <td><?php echo $vo['username']; ?></td>
                    <td>
                        <?php if(!(empty($vo['img_url']) || (($vo['img_url'] instanceof \think\Collection || $vo['img_url'] instanceof \think\Paginator ) && $vo['img_url']->isEmpty()))): ?>
                        <span class="label"><a href="<?php echo $vo['img_url']; ?>" target="_blank">查看截图</a></span>
                        <?php else: ?>
                        <span class="label" style="color: red;">手动补录排名没有截图</span>
                        <?php endif; ?>
                    </td>
                    <td>
                        <ob_link> <a class="btn" target="_blank" href="<?php echo url('keywordlistlog'); ?>?search_engine=<?php echo $vo['search_engine']; ?>&search_keyword=<?php echo $vo['keyword_name']; ?>&search_data=<?php echo $vo['url']; ?>"><i class="fa fa-fw fa-file-text"></i>历史记录</a></ob_link>
                    </td>
                </tr>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
        <?php else: ?>
        <tbody><tr class="odd"><td colspan="8" class="text-center" valign="top"><?php echo config('empty_list_describe'); ?></td></tr></tbody>
      <?php endif; ?>
    </table>
  </div>

  <div class="box-footer clearfix text-center">
      <?php echo $list->render(); ?>
  </div>

</div>

<script>
    //导出功能
    $(".export").click(function(){
        
        window.location.href = searchFormUrl($(".export"));
    });
</script>
<!--<script>
    laydate.render({
        elem: '#test'
        ,type: 'date'
    });

</script>-->